<template>
    <el-card class="pageCard">
        <div class="cardTitle">
            <el-checkbox v-if="data.isCheckbox" v-model="data.value">{{ data.title }}</el-checkbox>
            <span v-else>{{ data.title }}</span>
        </div>
        <pageform v-if="data.type == 'form'" :data="data.data"></pageform>
        <pagetable v-if="data.type == 'table'"></pagetable>
    </el-card>
</template>
<script lang="ts" setup>
import { useRouter } from "vue-router";
const router = useRouter();
interface Props {
    data?: any;
}
const props = withDefaults(defineProps<Props>(), {
    // form/table
    data: {},
});
const topages = (url: string) => {
    router.push(url);
};
</script>
<style lang="scss" scoped>
.pageCard {
    margin-bottom: 20px;
    .cardTitle {
        font-size: 14px;
        font-weight: bold;
        color: #252b3a;
        margin-bottom: 30px;
        width: 180px;
    }
}
</style>
